package com.tl.app.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.tl.app.domain.AppOrder;

/**
 * 订单Service接口
 * 
 * @author suhp
 * @date 2024-07-07
 */
public interface IAppOrderService 
{
    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    public AppOrder selectAppOrderByOrderId(Long orderId);

    /**
     * 查询订单列表
     * 
     * @param appOrder 订单
     * @return 订单集合
     */
    public List<AppOrder> selectAppOrderList(AppOrder appOrder);
    
    /**
     * 查询随机订单列表
     * 
     * @param appOrder 订单
     * @return 订单集合
     */
    public List<Map<String,Object>> selecRandomOrderList(AppOrder appOrder);

    /**
     * 新增订单
     * 
     * @param appOrder 订单
     * @return 结果
     */
    public AppOrder insertAppOrder(AppOrder appOrder);

    /**
     * 修改订单
     * 
     * @param appOrder 订单
     * @return 结果
     */
    public int updateAppOrder(AppOrder appOrder);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteAppOrderByOrderIds(Long[] orderIds);

    /**
     * 删除订单信息
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    public int deleteAppOrderByOrderId(Long orderId);
    
    
    
    /**
     * 获取店员本周收益
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    public String selectAppOrderWeekClerkPrice(Long fwUserId);
    
    /**
     * 获取订单排名
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    public List<Map<String,Object>> selectAppOrderRnak(String type);
    
    /**
     * 发起支付订单
     * @param appOrder
     * @return
     */
    public Map<String, Object> payOrder(HttpServletRequest req,AppOrder appOrder);
}
